﻿Imports System.Data
Imports System.Data.SqlClient

Public Class HocKyDAO
    'Private dataProvider As DataProvider
    'Private sqlstr As String
    'Public Sub New()
    '    dataProvider = New DataProvider
    'End Sub
    'Public Shared Function GetData() As DataTable
    '    Dim dt As DataTable = dataProvider.Executequery("sp_XuatSV")
    '    Return dt
    'End Function


    'Public Shared Sub ThemHK(ByVal hk As HocKyDTO)
    '    Dim cn As SqlConnection = dataProvider.GetConnection()
    '    cn.Open()
    '    Dim cmd As SqlCommand = New SqlCommand("sp_ThemSinhVien")
    '    cmd.CommandType = CommandType.StoredProcedure
    '    cmd.Parameters.Add("@MaHocKy", SqlDbType.Int)
    '    cmd.Parameters.Add("@Nam", SqlDbType.Char, 10)

    '    cmd.Parameters("@MaHocKy").Value = hk.MaHocKy
    '    cmd.Parameters("@Nam").Value = hk.Nam

    '    cmd.ExecuteNonQuery()
    '    cn.Close()
    'End Sub

    'Public Function DeleteCustomer(ByVal qlHKDTO As HocKyDTO)
    '    Dim maHK As String = qlHKDTO.MaHocKy
    '    sqlstr = "DELETE Customer WHERE CustomerId='" & maHK & "'"
    '    Return dataProvider.Excute(sqlstr)
    'End Function

    Public Shared Function LayDSHocKy() As DataTable
        Return DataProvider.DocBang("SELECT MaHocKy, Nam FROM HOCKY")
    End Function
End Class
